-
-
Notifications
You must be signed in to change notification settings - Fork 421
Collision logging, Transformers for JSON and Standard Files #773
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Collision logging, Transformers for JSON and Standard Files #773
Conversation
…rite an existing resource
Used "npm audit fix".
…r to merge standard files
@johnrengelman This tests will always fail, since this merge into master from: Also visible in the history of CircleCI: https://app.circleci.com/pipelines/github/johnrengelman/shadow This pull-request itself didn't break any tests. |
Just for clarity: With the latest merge from master, all tests run fine. |
Shameless plug: If you need such functionality before it is implemented in the shadow plugin, you may consider my plugin https://github.com/REPLicated/classpath-collision-detector (it only detects collisions and does not attempt to create fat jars). |
@johnrengelman Hi, can I do anything for you to merge this pull request, does this PR have any problems? |
…rite an existing resource
…r to merge standard files
# Conflicts: # yarn.lock
…o debug So the user doesn't get flooded with superfluous logs
…on_logging # Conflicts: # .gitignore # src/docs/changes/README.md # src/main/groovy/com/github/jengelman/gradle/plugins/shadow/tasks/ShadowCopyAction.groovy # src/main/groovy/com/github/jengelman/gradle/plugins/shadow/tasks/ShadowJar.java # src/test/groovy/com/github/jengelman/gradle/plugins/shadow/ShadowPluginSpec.groovy # yarn.lock
@Master-Code-Programmer Thanks for the PR! Would you mind rebasing? |
Sounds great. I will rebase it. |
Did the rebase on another branch and all tests are passing, but I want to check it manually, to make sure everything went actually fine. |
I reopened this on another branch in PR #962. |
Last edit: 2023-11-01
Hi, I fitted the collsion_logging merge request from chapmajs to your current source code (#126).
Also I followed your wish to use typed parameters (which was really needed, because after adding them, some problems became obvious).
After that I used the modified plugin and with the warnings I could fix my problems instantly. Great!
The only problem was, that I was flooded with warnings about colliding META-INF/NOTICE, META-INF/license.txt, readme.txt and similar files. So I added a transformer, StandardFilesMergeTransformer, which takes these standard files, which exist in all big projects in big numbers, and merges them.
Since these are all pretty primitive files regarding their structure, no special YAML or JSON files, I just concatenate their contents the following way:
I added it as default because otherwise:
like "META-INF/notice.txt", "META-INF/license.txt"...
Edit:
With that changes, any user should be capable to build a fat JAR with more than one Spring (Boot) dependency, right out of the box. Otherwise it's a real pain to find out which files collide, and how to merge colliding JSON files, since that is the only colliding file type, which misses a merging transformer from this plugin.
And JSON is very common!
@johnrengelman Please re-visit this, when browsing through pull request.